package com.acmen.ump.api.controller.blog;


import com.acmen.ump.core.dto.ApiResponse;
import com.acmen.ump.entity.blog.BlogArticle;
import com.acmen.ump.service.blog.IBlogArticleService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 博客-文章表 前端控制器
 * </p>
 *
 * @author ftpolaris
 * @since 2019-08-24
 */
@RestController
@RequestMapping("/blog/blog-article")
public class BlogArticleController {

    @Autowired
    private IBlogArticleService iBlogArticleService;

    @GetMapping("/blogArticleList")
    public ApiResponse blogArticleList() {
        List<BlogArticle> blogArticleList = iBlogArticleService.list(new QueryWrapper<BlogArticle>().eq("id", "1"));
        return new ApiResponse(blogArticleList);
    }
}
